package config

import (
	"go.uber.org/zap"
	yaml "gopkg.in/yaml.v2"
	"io/ioutil"
)

func yaml_load(cfg string) {
	data, err := ioutil.ReadFile(cfg)
	if err != nil {
		Logger.Panic("Read yaml file error", zap.Error(err))
	}
	err = yaml.Unmarshal(data, RouteCfg)
	if err != nil {
		Logger.Panic("Yaml config error", zap.Error(err))
	}
}
